from test_python.jinx import Jinx
from test_python.timo import Timo


class HeroFactory:

    def create_hero(self, name):
        if name == "jinx":
            return Jinx()
        elif name == "timo":
            return Timo()
        else:
            raise Exception("该人物未解锁！！！")


jinx = HeroFactory().create_hero("jinx") # 类名后面不加（），代表什么含义，不是创建实例对象嘛？
timo = HeroFactory().create_hero("timo")
jinx.fight(timo.power, timo.hp, timo.hero_name)